#include "img_struct.h"

statistics_config_t imx036_tile_config = {
	1,
	1,

	24,
	16,
	128,
	48,
	160,
	250,
	160,
	250,
	0,
	16383,

	12,
	8,
	0,
	8,
	340,
	512,

	8,
	5,
	256,
	10,
	448,
	816,
	448,
	816,

	0,
	16383,
};

line_t imx036_50hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY100, ISO_100, 0}}, {{SHUTTER_1BY100, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY50, ISO_100, 0}}, {{SHUTTER_1BY50, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_6400,0}}
		}
};

line_t imx036_60hz_lines[] = {
		{
		{{SHUTTER_1BY8000, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_100,0}}
		},

		{
		{{SHUTTER_1BY120, ISO_100, 0}}, {{SHUTTER_1BY120, ISO_300, 0}}
		},

		{
		{{SHUTTER_1BY60, ISO_100, 0}}, {{SHUTTER_1BY60, ISO_800,0}}
		},

		{
		{{SHUTTER_1BY30, ISO_100, 0}}, {{SHUTTER_1BY30, ISO_6400,0}}
		}
};
 
img_awb_param_t imx036_awb_param = {
	{
		{1598, 1024, 1875},	//AUTOMATIC
		{1087, 1024, 2652},	//INCANDESCENT
		{1336, 1024, 2305},	//D4000
		{1598, 1024, 1875},	//D5000
		{1857, 1024, 1571},	//SUNNY
		{2031, 1024, 1528},	//CLOUDY
		{1598, 1024, 1875},	//FLASH
		{1024, 1024, 1024},	//FLUORESCENT
		{1024, 1024, 1024},	//FLUORESCENT_H
		{1024, 1024, 1024},	//UNDER WATER
		{1024, 1024, 1024},	//CUSTOM
		{1598, 1024, 1875},	//AUTOMATIC OUTDOOR
	},
	{
		12,
		{{ 750, 1600, 2050, 3100, -1400, 3300, -1400, 4850, 1000, 1350, 1000,  2300, 1 },	// 0	INCANDESCENT
		 {  850, 1750, 1850, 2950, -1400, 3300, -1400, 4850, 1000,   700, 1000,  1400, 2 },	// 1    D4000
		 {1050, 2000, 1400, 2700, -1200, 3080, -1400, 4850, 1000, -100, 1000,    800, 4 },	// 2	 D5000
		 {1350, 2200, 1250, 2400, -1000, 2800, -1200, 4450, 1000, -600, 1000,    150, 8 },	// 3    SUNNY
		 {1600, 2550, 1000, 2100,   -800, 2450, -1000, 4050, 1000,-1350, 1000,   -50, 4 },	// 4    CLOUDY
		 {2400, 3100, 1650, 2150,   -600, 3200,   -600, 3850, 1000,-1250, 1000, -300, 0 },	// 5    PROJECTOR
		 {1700, 2150, 1920, 2700, -1400, 4600, -1200, 5000, 1600,-1350, 1024, 750, -1 },	// 6	GREEN REGION
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 7    FLASH
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 8	FLUORESCENT
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 9    FLUORESCENT_2
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 },	// 10	FLUORESCENT_3
		 {   0,    0,    0,    0,     0,    0,     0,    0,   0,   0,    0,    0, 0 }},
	},
	{	{ 0 ,6},	//LUT num. AUTOMATIC  INDOOR
		{ 0, 1},	//LUT num. INCANDESCENT
		{ 1, 1},	//LUT num. D4000
		{ 2, 1},	//LUT num. D5000
		{ 2, 5},	//LUT num. SUNNY
		{ 4, 3},	//LUT num. CLOUDY
		{ 7, 1},	//LUT num. FLASH
		{ 8, 1},	//LUT num. FLUORESCENT
		{ 9, 1},	//LUT num. FLUORESCENT_H
		{11, 1},	//LUT num. UNDER WATER
		{11, 1},	//LUT num. CUSTOM
		{ 0, 7},	//LUT num. AUTOMATIC  OUTDOOR
	 }
};
u32 imx036_ae_agc_dgain[AGC_DGAIN_TABLE_LENGTH]={
		1066,
		1072,1078,1084,1090,1096,1093,1072,1078,1084,1089,1095,1101,1064,1070,1076,1090,
		1088,1102,1100,1072,1078,1084,1090,1096,1102,1075,1081,1087,1093,1099,1097,1072,
		1078,1083,1089,1095,1101,1107,1075,1081,1087,1093,1099,1105,1074,1080,1086,1092,
		1098,1104,1110,1080,1086,1092,1098,1104,1110,1075,1081,1087,1092,1098,1104,1071,
		1083,1083,1095,1101,1100,1113,1080,1086,1092,1098,1104,1104,1079,1085,1091,1096,
		1102,1108,1114,1084,1090,1096,1102,1108,1114,1079,1085,1091,1097,1103,1109,1076,
		1087,1093,1099,1105,1106,1117,1080,1091,1097,1103,1109,1110,1079,1085,1091,1097,
		1103,1109,1115,1085,1091,1097,1103,1109,1115,1082,1088,1094,1100,1106,1112,1062,
		1068,1069,1079,1085,1091,1093,1063,1069,1075,1081,1087,1093,1060,1070,1076,1082,
		1088,1094,1095,1064,1070,1076,1082,1084,1093,1064,1069,1075,1081,1087,1093,1061,
		1066,1072,1078,1084,1090,1096,1064,1070,1076,1082,1088,1094,1060,1066,1075,1078,
		1084,1089,1095,1067,1072,1075,1084,1090,1096,1065,1068,1077,1079,1085,1091,1065,
		1067,1073,1079,1088,1091,1097,1065,1071,1077,1082,1088,1094,1064,1070,1076,1081,
		1087,1093,1099,1067,1076,1082,1087,1090,1099,1066,1071,1077,1083,1089,1095,1065,
		1069,1074,1080,1086,1092,1101,1067,1073,1079,1084,1090,1096,1064,1070,1076,1082,
		1087,1093,1099,1071,1074,1080,1086,1092,1098,1066,1071,1077,1083,1089,1095,1034,
		1042,1045,1051,1057,1062,1070,1038,1042,1048,1053,1061,1067,1036,1042,1046,1053,
		1057,1063,1070,1037,1045,1048,1056,1062,1066,1036,1041,1047,1053,1058,1064,1034,
		1039,1045,1050,1056,1062,1068,1036,1042,1048,1053,1059,1063,1033,1041,1045,1050,
		1056,1062,1069,1039,1043,1049,1054,1062,1067,1035,1041,1046,1052,1058,1062,1034,
		1038,1045,1051,1057,1061,1058,1037,1041,1047,1054,1058,1066,1036,1041,1047,1053,
		1058,1064,1070,1038,1045,1050,1057,1061,1068,1037,1041,1047,1052,1058,1064,1033,
		1039,1045,1050,1056,1063,1068,1037,1043,1050,1053,1059,1066,1035,1040,1046,1051,
		1057,1063,1070,1039,1045,1051,1056,1062,1068,1037,1042,1048,1054,1059,1057,1007,
		1012,1018,1023,1029,1034,1041,1010,1013,1020,1024,1029,1035,1006,1011,1018,1023,
		1030,1034,1038,1008,1013,1018,1024,1032,1036,1007,1013,1018,1024,1029,1035,1004,
		1009,1015,1019,1026,1031,1038,1008,1014,1019,1025,1030,1037,1007,1012,1017,1023,
		1028,1033,1040,1010,1016,1021,1026,1032,1038,1007,1013,1018,1023,1029,1034,1005,
		1011,1016,1023,1027,1033,1039,1009,1013,1020,1024,1031,1036,1008,1012,1018,1024,
		1029,1035,1041,1011,1016,1021,1027,1033,1039,1008,1013,1017,1025,1030,1035,1006,
		1011,1017,1023,1028,1034,1040,1010,1014,1020,1026,1031,1037,1007,1013,1018,1024,
		1029,1034,1041,1012,1017,1022,1028,1034,1039,1009,1014,1020,1025,1030,1036,1008,
		1012,1018,1023,1029,1034,1040,1012,1017,1022,1028,1033,1039,1009,1015,1021,1026,
		1032,1036,1043,1013,1019,1024,1030,1036,1041,1011,1017,1022,1027,1033,1039,1010,
		1015,1020,1027,1032,1037,1043,1012,1018,1023,1028,1034,1040,1011,1017,1022,1028,
		1033,1039,1044,1014,1019,1025,1030,1036,1042,1013,1019,1025,1030,1036,1041,1010,
		1016,1021,1027,1032,1038,1044,1015,1021,1026,1032,1038,1043,1013,1018,1024,1030,
		1034,1040,1046,1019,1024,1030,1035,1041,1047,1014,1019,1025,1030,1036,1042,1015,
		1020,1026,1031,1037,1042,1047,1017,1022,1028,1034,1039,1035,1014,1020,1025,1031,
		1036,1042,1047,1020,1026,1032,1037,1042,1048,1016,1021,1027,1033,1038,1044,1014,
		1020,1025,1031,1037,1042,1048,1017,1023,1028,1033,1039,1045,1017,1023,1028,1033,
		1039,1045,1050,1022,1027,1033,1039,1044,1050,1019,1024,1030,1035,1041,1047,1016,
		1021,1026,1032,1037,1043,1049,1020,1026,1031,1037,1043,1049,984,990,995,1001,
		1006,1012,1016,985,990,995,1001,1007,1012,986,991,996,1002,1008,1013,986,
		991,996,1002,1007,1013,1019,988,994,999,1005,1010,1016,986,991,997,1001,
		1007,1013,1018,992,998,1003,1008,1014,1019,986,991,997,1002,1008,1013,986,
		992,997,1002,1007,1013,1019,991,996,1001,1006,1013,1017,987,992,998,1003,
		1009,1014,1020,989,994,1000,1005,1011,1016,991,996,1002,1007,1012,1018,1024,

	};
u32 imx036_ae_sht_dgain_3m15[SHUTTER_DGAIN_TABLE_LENGTH] = 
{
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,
	1024,1019,1047,1043,1041,1036,1033,1028,1024,1054,1051,1048,1044,1038,1036,1033,1027,1024,1057,
	1053,1048,1043,1037,1034,1028,1024,1058,1054,1051,1045,1041,1037,1033,1029,1024,1062,1058,1053,
	1048,1044,1039,1034,1029,1024,1067,1062,1057,1052,1048,1043,1038,1032,1028,1024,1069,1064,1060,
	1054,1050,1045,1041,1034,1030,1024,1077,1072,1066,1062,1056,1050,1046,1041,1036,1031,1024,1080,
	1074,1070,1065,1057,1052,1045,1039,1034,1029,1024,1088,1083,1078,1073,1067,1062,1057,1052,1045,
	1041,1035,1031,1024,1093,1087,1082,1076,1070,1063,1057,1051,1046,1040,1035,1029,1024,1084,1093,
	1087,1080,1076,1070,1065,1059,1052,1047,1042,1036,1030,1024,1109,1102,1096,1090,1084,1078,1071,
	1066,1059,1053,1047,1042,1035,1029,1024,1088,1085,1080,1076,1071,1068,1063,1059,1056,1051,1049,
	1046,1041,1036,1034,1028,1024,1100,1096,1092,1086,1084,1080,1075,1069,1066,1061,1055,1051,1047,
	1045,1041,1040,1031,1028,1024,1114,1108,1104,1100,1096,1090,1087,1081,1077,1072,1067,1062,1057,
	1053,1049,1045,1039,1033,1028,1024,1133,1130,1126,1119,1113,1110,1106,1102,1093,1086,1081,1078,
	1073,1069,1062,1057,1052,1045,1040,1037,1033,1029,1024,1167,1159,1155,1149,1143,1138,1133,1130,
	1124,1118,1114,1110,1104,1099,1092,1087,1082,1076,1072,1065,1060,1053,1048,1040,1035,1031,1024,
	1204,1198,1193,1186,1180,1173,1168,1164,1156,1148,1142,1136,1130,1124,1118,1111,1107,1101,1096,
	1090,1085,1077,1071,1066,1061,1055,1049,1044,1037,1030,1024,1196,1191,1187,1181,1176,1171,1167,
	1161,1155,1152,1147,1144,1136,1136,1128,1125,1119,1116,1110,1104,1098,1094,1090,1083,1079,1074,
	1069,1066,1061,1056,1052,1047,1043,1038,1035,1029,1024,1286,1282,1277,1271,1262,1256,1251,1244,
	1238,1234,1230,1224,1217,1214,1207,1201,1193,1190,1183,1176,1172,1165,1159,1155,1149,1143,1138,
	1132,1126,1119,1113,1106,1102,1096,1088,1085,1078,1072,1065,1059,1054,1046,1041,1036,1031,1024,
	1440,1424,1410,1396,1385,1365,1357,1342,1330,1315,1300,1287,1272,1260,1245,1232,1217,1206,1192,
	1180,1166,1150,1138,1124,1109,1096,1083,1068,1052,1037,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,

};
u32 imx036_ae_sht_dgain_1080p[SHUTTER_DGAIN_TABLE_LENGTH] =
{
	1024,
	1023,1022,1021,1021,1020,1019,1018,1018,1017,1017,1016,1015,1015,1015,1015,1015,
	1014,1015,1015,1014,1014,1015,1014,1015,1015,1014,1015,1015,1014,1014,1014,1015,
	1015,1015,1015,1015,1015,1015,1015,1015,1014,1013,1013,1013,1013,1014,1013,1013,
	1013,1011,1011,1011,1011,1011,1011,1011,1011,1011,1011,1012,1011,1011,1012,1011,
	1011,1012,1012,1011,1011,1012,1012,1012,1011,1011,1011,1011,1011,1011,1012,1012,
	1012,1013,1013,1013,1013,1013,1012,1012,1013,1013,1012,1012,1013,1014,1012,1012,
	1011,1012,1012,1011,1012,1011,1012,1012,1013,1012,1012,1013,1012,1014,1013,1013,
	1014,1014,1014,1013,1014,1015,1014,1014,1015,1015,1015,1014,1014,1014,1014,1016,
	1014,1013,1013,1013,1012,1012,1012,1012,1012,1012,1012,1012,1012,1011,1011,1012,
	1012,1013,1012,1012,1013,1012,1012,1013,1014,1012,1013,1011,1011,1012,1011,1012,
	1011,1012,1011,1012,1011,1012,1011,1012,1012,1013,1012,1014,1013,1012,1013,1013,
	1012,1014,1013,1012,1014,1013,1012,1011,1013,1013,1012,1012,1014,1013,1013,1012,
	1013,1012,1012,1014,1014,1014,1014,1014,1014,1014,1014,1014,1013,1013,1013,1014,
	1013,1013,1014,1014,1014,1014,1015,1015,1013,1013,1013,1014,1014,1015,1016,1014,
	1015,1016,1017,1017,1015,1016,1017,1017,1015,1016,1017,1015,1016,1017,1015,1016,
	1017,1015,1016,1017,1015,1016,1017,1014,1016,1014,1015,1013,1015,1017,1015,1017,
	1014,1016,1015,1017,1015,1017,1015,1017,1015,1014,1016,1015,1017,1015,1017,1015,
	1014,1016,1014,1017,1015,1014,1016,1015,1014,1017,1016,1014,1017,1016,1014,1013,
	1016,1015,1014,1012,1015,1015,1014,1013,1016,1015,1014,1014,1014,1019,1018,1017,
	1017,1016,1020,1020,1019,1019,1018,1017,1017,1015,1020,1020,1019,1019,1018,1018,
	1018,1018,1017,1017,1017,1016,1015,1015,1020,1020,1020,1019,1019,1018,1018,1018,
	1019,1019,1013,1015,1016,1017,1017,1017,1018,1018,1019,1019,1019,1020,1020,1019,
	1020,1014,1015,1016,1016,1017,1017,1019,1020,1021,1015,1016,1017,1017,1018,1020,
	1015,1016,1017,1018,1020,1014,1016,1017,1018,1020,1017,1018,1019,1021,1023,1017,
	1017,1021,1023,1017,1019,1021,1023,1017,1019,1022,1016,1018,1021,1024,1018,1021,
	1024,1018,1021,1024,1016,1019,1021,1016,1019,1022,1016,1019,1022,1016,1020,1022,
	1019,1022,1025,1019,1022,1016,1019,1022,1016,1020,1023,1018,1022,1018,1022,1026,
	1020,1025,1019,1023,1018,1022,1027,1021,1026,1020,1022,1016,1020,1015,1019,1024,
	1019,1024,1018,1023,1018,1023,1018,1025,1019,1025,1019,1024,1019,1025,1019,1025,
	1019,1025,1020,1025,1021,1027,1021,1028,1022,1028,1023,1030,1024,1019,1026,1020,
	1027,1018,1026,1020,1027,1022,1016,1023,1018,1025,1020,1028,1022,1016,1028,1022,
	1030,1025,1033,1028,1022,1030,1024,1033,1027,1021,1029,1021,1030,1024,1019,1028,
	1022,1017,1026,1020,1030,1021,1018,1028,1023,1017,1027,1021,1016,1026,1021,1015,
	1025,1020,1031,1026,1020,1031,1028,1023,1034,1029,1023,1035,1029,1023,1035,1030,
	1024,1018,1031,1022,1016,1028,1023,1018,1030,1024,1018,1031,1025,1019,1014,1028,
	1026,1020,1034,1029,1023,1018,1032,1027,1021,1036,1030,1025,1019,1032,1026,1021,
	1036,1030,1024,1018,1034,1029,1024,1019,1035,1029,1024,1021,1037,1032,1026,1021,
	1039,1033,1028,1023,1041,1034,1029,1023,1038,1032,1027,1020,1015,1033,1028,1022,
	1017,1035,1030,1024,1019,1040,1034,1029,1024,1018,1040,1034,1028,1023,1017,1039,
	1033,1028,1021,1016,1037,1032,1027,1021,1015,1039,1032,1027,1021,1016,1040,1034,
	1030,1024,1019,1043,1038,1032,1027,1021,1047,1041,1036,1031,1025,1019,1045,1040,
	1034,1028,1022,1017,1044,1039,1033,1027,1022,1017,1046,1040,1035,1030,1024,1020,
	1050,1044,1039,1033,1027,1022,1053,1049,1042,1036,1031,1025,1020,1052,1045,1039,
	1033,1028,1022,1016,1051,1042,1038,1033,1027,1021,1017,1052,1046,1039,1035,1029,
	1024,1018,1057,1052,1045,1040,1034,1027,1023,1016,1056,1051,1045,1039,1034,1028,
	1019,1015,1056,1051,1045,1040,1034,1029,1022,1018,1061,1055,1049,1048,1042,1036,
	1030,1025,1019,1066,1059,1054,1049,1043,1037,1031,1023,1017,1067,1061,1057,1050,
	1045,1039,1032,1029,1022,1016,1070,1069,1063,1057,1052,1045,1040,1035,1029,1024,
	1080,1075,1069,1062,1056,1047,1040,1034,1027,1021,1016,1077,1071,1066,1060,1053,
	1048,1042,1040,1033,1029,1024,1017,1082,1076,1071,1063,1059,1053,1048,1041,1035,
	1028,1023,1018,1086,1081,1075,1069,1062,1056,1051,1045,1039,1034,1028,1022,1017,
	1093,1088,1081,1075,1070,1065,1059,1053,1049,1041,1042,1037,1031,1024,1020,1100,
	1094,1089,1082,1077,1071,1066,1059,1054,1043,1037,1032,1026,1021,1018,1109,1104,
	1096,1093,1084,1081,1074,1071,1064,1061,1051,1046,1040,1033,1028,1022,1017,1116,
	1110,1104,1101,1096,1088,1083,1077,1073,1068,1061,1055,1050,1044,1038,1032,1022,
	1015,1128,1123,1118,1112,1104,1100,1094,1086,1081,1076,1069,1065,1062,1056,1049,
	1043,1038,1031,1026,1021,1014,1148,1142,1137,1130,1126,1120,1114,1108,1102,1095,
	1090,1084,1078,1072,1065,1060,1056,1045,1040,1037,1028,1025,1018,1163,1158,1152,
	1146,1140,1133,1127,1128,1124,1117,1111,1102,1097,1091,1085,1081,1073,1066,1064,
	1056,1054,1043,1038,1028,1028,1019,1194,1188,1181,1175,1168,1161,1153,1148,1141,
	1133,1128,1120,1116,1110,1105,1101,1092,1089,1080,1077,1070,1068,1064,1052,1045,
	1046,1037,1031,1025,1019,1015,1233,1234,1218,1217,1209,1197,1196,1191,1181,1171,
	1170,1160,1157,1153,1147,1142,1129,1136,1127,1119,1116,1105,1106,1092,1088,1083,
	1076,1072,1069,1057,1056,1052,1040,1039,1026,1019,1013,1239,1283,1271,1260,1262,
	1248,1239,1237,1233,1226,1222,1206,1213,1204,1198,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
	1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,1180,
};
u32 imx036_ae_sht_dgain[SHUTTER_DGAIN_TABLE_LENGTH]={

	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
	1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,1024,
};
u8 imx036_dlight[2] = {128,4};